package com.tiny.work.db;

public class TestDB {
    public static void main(String[] args) throws InterruptedException {
//        ProductService productService = new ProductServiceImpl();
//        productService.updateProductPrice(1, 3000);

            ProductServiceImpl productService = new ProductServiceImpl();
            MyThread myThread = new MyThread(productService);
            myThread.start();
//        Thread.sleep(10000);
        MyThread myThread1 = new MyThread(productService);
        myThread1.start();

    }
}

class MyThread extends Thread{

    private ProductServiceImpl productService;

    public MyThread(ProductServiceImpl productService){
        this.productService = productService;
    }

    @Override
    public void run() {
        productService.updateProductPrice(1,3000);
    }
}